package com.example.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.demo.entity.ChatMessage;
import com.example.demo.entity.DTO.LoadMessageDTO;
import com.example.demo.entity.Message;
import com.example.demo.entity.Result;
import org.springframework.stereotype.Component;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yolo
 * @since 2025-03-28
 */@Component
public interface IMessageService extends IService<Message> {
    void savePublicMessage(ChatMessage message);

    Integer savePrivateMessage(ChatMessage message);

    void markMessageAsRead(Long messageId);

    Result getUnReadMessageListByUsername(String username);

    Result getChatMessageByMutualUsername(LoadMessageDTO loadMessageDTO);

    Result getChatList(LoadMessageDTO loadMessageDTO);

    Result getUnreadCountList(LoadMessageDTO loadMessageDTO);

    Result getUnreadCount(String currentUsername);
}
